package com.lanou3g.hw0510;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * Created by dllo on 18/5/10.
 */
@WebServlet(name = "BServlet", urlPatterns = "/b")
public class BServlet extends HttpServlet {
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.addHeader("Content-Type", "text/html;charset=utf-8");
        response.setHeader("Refresh","5;URL=/down");
        response.getWriter().println("<a href=\"/down\">"+
        "5s后如果没有下载请点击此处</a><img src=\"pic/aa.jpg\">");
    }
}
